import { createBrowserRouter } from "react-router-dom";
import Home from "../page/Home.tsx";
import Login from "../page/Login";
import { Register } from "../page/Register";
import UserInfo from "../page/UserInfo/UserInfo.tsx";
import UserInfoView from "../page/UserInfo/UserInfoView.tsx";
import AddRoom from "../page/AddRoom/AddRoom.tsx";
import Search from "../page/Search/Search.tsx";
import RoomInfo from "../page/RoomInfo/RoomInfo.tsx";
const routers = [
  {
    path: "/",
    element: <Home></Home>,
  },
  {
    path: "/home",
    element: <Home></Home>,
  },
  {
    path: "/login",
    element: <Login></Login>,
  },
  {
    path: "/register",
    element: <Register></Register>,
  },
  {
    path: "/userInfo",
    element: <UserInfo></UserInfo>,
  },
  {
    path: "/editUserInfo",
    element: <UserInfoView></UserInfoView>,
  },
  {
    path: "/addRoom",
    element: <AddRoom></AddRoom>,
  },
  {
    path: "/search",
    element: <Search></Search>,
  },
  {
    path: `/roomInfo/:ids`,
    element: <RoomInfo></RoomInfo>,
  },
];

export default createBrowserRouter(routers);
